from nicegui import ui


def toggle_card_visibility():
    card._style["display"] = "block" if card._style["display"] == "none" else "none"
    card.update()


with ui.header(elevated=True):
    ui.button("test", on_click=toggle_card_visibility)

    with ui.card().classes("absolute left-0 bottom-0 text-black w-full ").style(
        "transform: translate(0, 100%);display:none;"
    ) as card:
        ui.label("Hello")
        ui.label("World")


with ui.right_drawer(fixed=False).style("background-color: #ebf1fa").props(
    "bordered"
) as right_drawer:
    ui.label("RIGHT DRAWER")

ui.run()
